<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>持续集成(CI/CD)完全指南 - 现代软件开发实践</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        :root {
            --primary: #4F46E5;
            --secondary: #10B981;
            --dark: #1F2937;
            --light: #F9FAFB;
            --accent: #F59E0B;
        }
        
        body {
            font-family: 'Noto Sans SC', 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
            color: var(--dark);
            line-height: 1.6;
            background-color: #f8fafc;
        }
        
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        
        .card-hover {
            transition: all 0.3s ease;
        }
        
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        
        .section-divider {
            position: relative;
            height: 80px;
            overflow: hidden;
        }
        
        .section-divider::before {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            height: 100%;
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            clip-path: polygon(0 0, 100% 0, 100% 50%, 0 100%);
            z-index: -1;
        }
        
        .drop-cap::first-letter {
            float: left;
            font-size: 4.5rem;
            line-height: 0.65;
            margin: 0.1em 0.1em 0.1em 0;
            color: var(--primary);
            font-weight: 700;
        }
        
        .timeline-item {
            position: relative;
            padding-left: 2.5rem;
            margin-bottom: 2rem;
        }
        
        .timeline-item::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0.5rem;
            width: 1.5rem;
            height: 1.5rem;
            border-radius: 50%;
            background-color: var(--primary);
            border: 4px solid white;
            box-shadow: 0 0 0 2px var(--primary);
        }
        
        .timeline-item::after {
            content: "";
            position: absolute;
            left: 0.75rem;
            top: 2rem;
            bottom: -2rem;
            width: 2px;
            background-color: #e5e7eb;
        }
        
        .timeline-item:last-child::after {
            display: none;
        }
    </style>
</head>
<body class="antialiased">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 md:py-32 px-4 md:px-0">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="flex flex-col md:flex-row items-center">
                <div class="md:w-1/2 mb-10 md:mb-0">
                    <h1 class="text-4xl md:text-5xl font-bold mb-4 leading-tight">
                        持续集成(CI/CD)完全指南
                    </h1>
                    <p class="text-xl md:text-2xl opacity-90 mb-8">
                        现代软件开发的高效实践方法论
                    </p>
                    <div class="flex items-center space-x-4">
                        <a href="#what-is-ci" class="bg-white text-indigo-600 hover:bg-gray-100 px-6 py-3 rounded-lg font-semibold transition duration-300">
                            开始探索
                        </a>
                        <a href="https://www.bilibili.com/video/BV1G64y1U7kb/" target="_blank" class="flex items-center text-white hover:text-gray-200 transition duration-300">
                            <i class="fas fa-play-circle text-2xl mr-2"></i>
                            观看视频教程
                        </a>
                    </div>
                </div>
                <div class="md:w-1/2 flex justify-center">
                    <div class="relative w-full max-w-md">
                        <div class="absolute -top-6 -left-6 w-32 h-32 rounded-full bg-indigo-300 opacity-20 animate-pulse"></div>
                        <div class="absolute -bottom-6 -right-6 w-32 h-32 rounded-full bg-purple-300 opacity-20 animate-pulse delay-300"></div>
                        <div class="relative bg-white bg-opacity-10 backdrop-filter backdrop-blur-lg rounded-xl p-6 shadow-2xl border border-white border-opacity-20">
                            <div class="mermaid">
                                flowchart LR
                                A[开发者提交代码] --> B[自动构建]
                                B --> C[自动测试]
                                C --> D{测试通过?}
                                D -->|是| E[自动部署]
                                D -->|否| F[通知团队]
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- What is CI Section -->
    <section id="what-is-ci" class="py-16 bg-white">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="text-center mb-16">
                <span class="inline-block px-4 py-1 bg-indigo-100 text-indigo-600 rounded-full text-sm font-semibold mb-4">
                    核心概念
                </span>
                <h2 class="text-3xl md:text-4xl font-bold text-gray-800 mb-4">
                    什么是持续集成？
                </h2>
                <div class="w-20 h-1 bg-indigo-500 mx-auto"></div>
            </div>
            
            <div class="flex flex-col md:flex-row items-center mb-16">
                <div class="md:w-1/2 mb-8 md:mb-0 md:pr-8">
                    <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1651308769870-30f99f02-2271-47bb-8dbf-6ba5e674dc3e.png" alt="持续集成" class="rounded-lg shadow-md w-full h-auto">
                </div>
                <div class="md:w-1/2">
                    <h3 class="text-2xl font-bold text-gray-800 mb-4">
                        <i class="fas fa-sync-alt text-indigo-500 mr-2"></i>
                        持续集成(Continuous Integration)
                    </h3>
                    <p class="text-gray-600 mb-6 drop-cap">
                        持续集成（Continuous Integration，简称CI），是一种软件开发实践，在实践中指只要代码有变更，就自动运行构建和测试，反馈运行结果。通俗一点来讲，就是绑定项目的代码仓库，SVN或者Git库，自动抓取新的代码，完成构建，甚至执行测试，部署到服务器。
                    </p>
                    <p class="text-gray-600">
                        持续集成强调开发人员提交了新代码之后，立刻进行构建、（单元）测试。根据测试结果，我们可以确定新代码和原有代码能否正确地集成在一起。
                    </p>
                </div>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div class="bg-gray-50 rounded-xl p-8 card-hover">
                    <div class="flex items-center mb-4">
                        <div class="bg-green-100 p-3 rounded-full mr-4">
                            <i class="fas fa-truck text-green-600 text-xl"></i>
                        </div>
                        <h3 class="text-xl font-bold text-gray-800">持续交付(Continuous Delivery)</h3>
                    </div>
                    <p class="text-gray-600">
                        持续是在持续集成的基础上，将集成后的代码部署到更贴近真实运行环境(类生产环境)中。比如，我们完成单元测试后，可以把代码部署到连接数据库的测试环境中更多的测试。如果代码没有问题，可以继续手动部署到生产环境。
                    </p>
                    <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1651308770279-44cbfc46-d213-4b9b-9f1e-3a890abbc394.png" alt="持续交付" class="mt-4 rounded-lg w-full">
                </div>
                
                <div class="bg-gray-50 rounded-xl p-8 card-hover">
                    <div class="flex items-center mb-4">
                        <div class="bg-purple-100 p-3 rounded-full mr-4">
                            <i class="fas fa-rocket text-purple-600 text-xl"></i>
                        </div>
                        <h3 class="text-xl font-bold text-gray-800">持续部署(Continuous Deployment)</h3>
                    </div>
                    <p class="text-gray-600">
                        持续部署是持续交付的下一步，指的是代码通过评审以后，自动部署到生产环境。持续部署的目标是，代码在任何时刻都是可部署的，可以进入生产阶段。持续部署的前提是能自动化完成测试、构建、部署等步骤。
                    </p>
                    <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1651308770729-637f0d5c-6c56-46e5-a698-08521b7e83e8.png" alt="持续部署" class="mt-4 rounded-lg w-full">
                </div>
            </div>
        </div>
    </section>

    <!-- Key Concepts Section -->
    <section class="py-16 bg-gray-50">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="text-center mb-16">
                <span class="inline-block px-4 py-1 bg-indigo-100 text-indigo-600 rounded-full text-sm font-semibold mb-4">
                    关键术语
                </span>
                <h2 class="text-3xl md:text-4xl font-bold text-gray-800 mb-4">
                    持续集成中的核心概念
                </h2>
                <div class="w-20 h-1 bg-indigo-500 mx-auto"></div>
            </div>
            
            <div class="grid md:grid-cols-2 lg:grid-cols-4 gap-6 mb-16">
                <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100 card-hover">
                    <div class="text-indigo-500 text-3xl mb-4">
                        <i class="fas fa-redo"></i>
                    </div>
                    <h3 class="text-xl font-bold text-gray-800 mb-2">持续 (Continuous)</h3>
                    <p class="text-gray-600">不断的获取反馈，响应反馈。</p>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100 card-hover">
                    <div class="text-green-500 text-3xl mb-4">
                        <i class="fas fa-puzzle-piece"></i>
                    </div>
                    <h3 class="text-xl font-bold text-gray-800 mb-2">集成 (Integration)</h3>
                    <p class="text-gray-600">编译、测试、打包。</p>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100 card-hover">
                    <div class="text-purple-500 text-3xl mb-4">
                        <i class="fas fa-server"></i>
                    </div>
                    <h3 class="text-xl font-bold text-gray-800 mb-2">部署 (Deployment)</h3>
                    <p class="text-gray-600">应用组件或基本设施的代码或配置变更在产品环境生效。</p>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100 card-hover">
                    <div class="text-yellow-500 text-3xl mb-4">
                        <i class="fas fa-box-open"></i>
                    </div>
                    <h3 class="text-xl font-bold text-gray-800 mb-2">交付 (Delivery)</h3>
                    <p class="text-gray-600">可以理解为从开发分支到测试分支之间的阶段，强调的是一种能力。</p>
                </div>
            </div>
            
            <div class="bg-white rounded-xl shadow-md overflow-hidden">
                <div class="md:flex">
                    <div class="md:w-1/2 p-8 md:p-12">
                        <h3 class="text-2xl font-bold text-gray-800 mb-4">频繁部署的优势</h3>
                        <p class="text-gray-600 mb-6">
                            频繁部署可以有效降低变更带来的风险,同时业务负责人仍然能保持何时向最终用户发布功能的控制。
                        </p>
                        <div class="mermaid">
                            pie
                                title CI/CD 优势
                                "快速暴露错误" : 25
                                "保证代码质量" : 20
                                "降低集成风险" : 20
                                "促进快速迭代" : 35
                        </div>
                    </div>
                    <div class="md:w-1/2">
                        <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1651308771070-46da5b74-4ac9-4354-9f84-60cef4c6a073.png" alt="CI/CD 流程图" class="w-full h-full object-cover">
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Benefits Section -->
    <section class="py-16 bg-white">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="text-center mb-16">
                <span class="inline-block px-4 py-1 bg-indigo-100 text-indigo-600 rounded-full text-sm font-semibold mb-4">
                    价值体现
                </span>
                <h2 class="text-3xl md:text-4xl font-bold text-gray-800 mb-4">
                    持续集成的五大优势
                </h2>
                <div class="w-20 h-1 bg-indigo-500 mx-auto"></div>
            </div>
            
            <div class="grid md:grid-cols-2 lg:grid-cols-5 gap-6">
                <div class="bg-indigo-50 p-6 rounded-xl border border-indigo-100 text-center card-hover">
                    <div class="bg-indigo-100 w-16 h-16 mx-auto rounded-full flex items-center justify-center mb-4">
                        <i class="fas fa-bug text-indigo-600 text-2xl"></i>
                    </div>
                    <h3 class="text-lg font-bold text-gray-800 mb-2">快速暴露错误</h3>
                    <p class="text-gray-600 text-sm">及早发现问题，降低修复成本</p>
                </div>
                
                <div class="bg-green-50 p-6 rounded-xl border border-green-100 text-center card-hover">
                    <div class="bg-green-100 w-16 h-16 mx-auto rounded-full flex items-center justify-center mb-4">
                        <i class="fas fa-check-circle text-green-600 text-2xl"></i>
                    </div>
                    <h3 class="text-lg font-bold text-gray-800 mb-2">保证代码质量</h3>
                    <p class="text-gray-600 text-sm">自动化测试确保每次提交质量</p>
                </div>
                
                <div class="bg-yellow-50 p-6 rounded-xl border border-yellow-100 text-center card-hover">
                    <div class="bg-yellow-100 w-16 h-16 mx-auto rounded-full flex items-center justify-center mb-4">
                        <i class="fas fa-search text-yellow-600 text-2xl"></i>
                    </div>
                    <h3 class="text-lg font-bold text-gray-800 mb-2">定位错误容易</h3>
                    <p class="text-gray-600 text-sm">小范围变更便于问题定位</p>
                </div>
                
                <div class="bg-red-50 p-6 rounded-xl border border-red-100 text-center card-hover">
                    <div class="bg-red-100 w-16 h-16 mx-auto rounded-full flex items-center justify-center mb-4">
                        <i class="fas fa-shield-alt text-red-600 text-2xl"></i>
                    </div>
                    <h3 class="text-lg font-bold text-gray-800 mb-2">降低集成风险</h3>
                    <p class="text-gray-600 text-sm">减少大规模集成的冲突</p>
                </div>
                
                <div class="bg-purple-50 p-6 rounded-xl border border-purple-100 text-center card-hover">
                    <div class="bg-purple-100 w-16 h-16 mx-auto rounded-full flex items-center justify-center mb-4">
                        <i class="fas fa-tachometer-alt text-purple-600 text-2xl"></i>
                    </div>
                    <h3 class="text-lg font-bold text-gray-800 mb-2">促进快速迭代</h3>
                    <p class="text-gray-600 text-sm">加速产品交付和反馈循环</p>
                </div>
            </div>
        </div>
    </section>

    <!-- Deployment Process Section -->
    <section class="py-16 bg-gray-50">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="text-center mb-16">
                <span class="inline-block px-4 py-1 bg-indigo-100 text-indigo-600 rounded-full text-sm font-semibold mb-4">
                    实施流程
                </span>
                <h2 class="text-3xl md:text-4xl font-bold text-gray-800 mb-4">
                    持续集成部署流程
                </h2>
                <div class="w-20 h-1 bg-indigo-500 mx-auto"></div>
            </div>
            
            <div class="max-w-3xl mx-auto">
                <div class="timeline-item">
                    <h3 class="text-xl font-bold text-gray-800 mb-2 flex items-center">
                        <span class="bg-indigo-100 text-indigo-600 px-3 py-1 rounded-full text-sm mr-3">步骤 1</span>
                        用户提交代码到Git仓库
                    </h3>
                    <p class="text-gray-600 pl-16">开发者完成功能开发后，将代码推送到版本控制系统</p>
                </div>
                
                <div class="timeline-item">
                    <h3 class="text-xl font-bold text-gray-800 mb-2 flex items-center">
                        <span class="bg-indigo-100 text-indigo-600 px-3 py-1 rounded-full text-sm mr-3">步骤 2</span>
                        Jenkins服务器拉取代码并构建
                    </h3>
                    <p class="text-gray-600 pl-16">Jenkins检测到代码变更后，自动拉取最新代码并使用Maven编译打包</p>
                </div>
                
                <div class="timeline-item">
                    <h3 class="text-xl font-bold text-gray-800 mb-2 flex items-center">
                        <span class="bg-indigo-100 text-indigo-600 px-3 py-1 rounded-full text-sm mr-3">步骤 3</span>
                        部署到应用服务器
                    </h3>
                    <p class="text-gray-600 pl-16">Jenkins通过SSH连接应用服务器，将构建产物传送到指定位置</p>
                </div>
                
                <div class="timeline-item">
                    <h3 class="text-xl font-bold text-gray-800 mb-2 flex items-center">
                        <span class="bg-indigo-100 text-indigo-600 px-3 py-1 rounded-full text-sm mr-3">步骤 4</span>
                        执行部署脚本
                    </h3>
                    <p class="text-gray-600 pl-16">Jenkins在应用服务器上执行重启脚本，完成应用更新</p>
                </div>
            </div>
        </div>
    </section>

    <!-- Jenkins Setup Section -->
    <section class="py-16 bg-white">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="text-center mb-16">
                <span class="inline-block px-4 py-1 bg-indigo-100 text-indigo-600 rounded-full text-sm font-semibold mb-4">
                    工具配置
                </span>
                <h2 class="text-3xl md:text-4xl font-bold text-gray-800 mb-4">
                    Jenkins安装与配置
                </h2>
                <div class="w-20 h-1 bg-indigo-500 mx-auto"></div>
            </div>
            
            <div class="mb-12">
                <h3 class="text-2xl font-bold text-gray-800 mb-6 flex items-center">
                    <i class="fas fa-question-circle text-indigo-500 mr-3"></i>
                    Jenkins是什么？
                </h3>
                <div class="bg-gray-50 p-6 rounded-lg border border-gray-200">
                    <p class="text-gray-600">
                        Jenkins是一个开源的、提供友好操作界面的持续集成(CI)工具，起源于Hudson（Hudson是商用的），主要用于持续、自动的构建/测试软件项目、监控外部任务的运行。Jenkins用Java语言编写，可在Tomcat等流行的servlet容器中运行，也可独立运行。通常与版本管理工具、构建工具结合使用。常用的版本控制工具有SVN、GIT，构建工具有Maven、Ant、Gradle。
                    </p>
                </div>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8 mb-12">
                <div>
                    <h3 class="text-2xl font-bold text-gray-800 mb-6 flex items-center">
                        <i class="fas fa-download text-green-500 mr-3"></i>
                        安装Jenkins
                    </h3>
                    <div class="bg-gray-50 p-6 rounded-lg border border-gray-200">
                        <h4 class="font-bold text-gray-700 mb-3">1. 将jenkins.war上传到tomcat的webapps下面</h4>
                        <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1651308771329-fde6f5f6-2e0d-4ac5-9fc8-1b2a5c0e4ffc.png" alt="Jenkins安装" class="rounded-md mb-4 w-full">
                        
                        <h4 class="font-bold text-gray-700 mb-3">2. 启动Tomcat会自动解压war包</h4>
                        <div class="bg-gray-800 p-4 rounded-md mb-4">
                            <code class="text-green-400">./startup.sh</code>
                        </div>
                        
                        <h4 class="font-bold text-gray-700 mb-3">3. 浏览器访问</h4>
                        <div class="bg-gray-800 p-4 rounded-md mb-4">
                            <code class="text-green-400">http://[your-server-ip]/jenkins/</code>
                        </div>
                        
                        <h4 class="font-bold text-gray-700 mb-3">4. 输入密码登录</h4>
                        <div class="bg-gray-800 p-4 rounded-md">
                            <code class="text-green-400">cat /root/.jenkins/secrets/initialAdminPassword</code>
                        </div>
                    </div>
                </div>
                
                <div>
                    <h3 class="text-2xl font-bold text-gray-800 mb-6 flex items-center">
                        <i class="fas fa-plug text-purple-500 mr-3"></i>
                        插件配置
                    </h3>
                    <div class="bg-gray-50 p-6 rounded-lg border border-gray-200">
                        <h4 class="font-bold text-gray-700 mb-3">1. 设置插件代理提高下载速度</h4>
                        <p class="text-gray-600 mb-4">
                            修改插件中心URL为: <code class="bg-gray-200 px-2 py-1 rounded">http://mirror.xmission.com/jenkins/updates/update-center.json</code>
                        </p>
                        <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1651308773680-3457ea1a-8350-4ffd-ac32-66f7b22c3e08.png" alt="Jenkins插件代理" class="rounded-md mb-4 w-full">
                        
                        <h4 class="font-bold text-gray-700 mb-3">2. 安装Git和Deploy插件</h4>
                        <p class="text-gray-600 mb-2">
                            搜索并安装以下插件:
                        </p>
                        <ul class="list-disc pl-5 text-gray-600 mb-4">
                            <li>Git plugin</li>
                            <li>Git Client plugin</li>
                            <li>Deploy to container Plugin</li>
                        </ul>
                        <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1651308774240-6a8b6e09-99ca-45d8-8b24-06635897c57a.png" alt="Jenkins插件安装" class="rounded-md w-full">
                    </div>
                </div>
            </div>
            
            <div class="mb-12">
                <h3 class="text-2xl font-bold text-gray-800 mb-6 flex items-center">
                    <i class="fas fa-cogs text-yellow-500 mr-3"></i>
                    全局工具配置
                </h3>
                <div class="bg-gray-50 p-6 rounded-lg border border-gray-200">
                    <div class="grid md:grid-cols-3 gap-6">
                        <div>
                            <h4 class="font-bold text-gray-700 mb-3 flex items-center">
                                <i class="fas fa-coffee text-brown-500 mr-2"></i>
                                JDK配置
                            </h4>
                            <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1651308777137-9dd2365a-2a20-466c-8453-28461de7f061.png" alt="JDK配置" class="rounded-md w-full">
                        </div>
                        <div>
                            <h4 class="font-bold text-gray-700 mb-3 flex items-center">
                                <i class="fab fa-git-alt text-orange-500 mr-2"></i>
                                Git配置
                            </h4>
                            <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1651308777687-133df14a-9c33-4d5e-9337-1c06574e2a02.png" alt="Git配置" class="rounded-md w-full">
                        </div>
                        <div>
                            <h4 class="font-bold text-gray-700 mb-3 flex items-center">
                                <i class="fas fa-boxes text-blue-500 mr-2"></i>
                                Maven配置
                            </h4>
                            <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1651308777951-2e6ad2ce-d028-4047-ba61-8600cda73659.png" alt="Maven配置" class="rounded-md w-full">
                        </div>
                    </div>
                </div>
            </div>
            
            <div>
                <h3 class="text-2xl font-bold text-gray-800 mb-6 flex items-center">
                    <i class="fas fa-project-diagram text-red-500 mr-3"></i>
                    创建Jenkins项目
                </h3>
                <div class="bg-gray-50 p-6 rounded-lg border border-gray-200">
                    <div class="grid md:grid-cols-2 gap-6 mb-6">
                        <div>
                            <h4 class="font-bold text-gray-700 mb-3">1. 新建项目</h4>
                            <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1651308778507-8cad62ea-fd00-4528-bf87-8c1fd2b2b029.png" alt="新建项目" class="rounded-md w-full">
                        </div>
                        <div>
                            <h4 class="font-bold text-gray-700 mb-3">2. 配置Git仓库</h4>
                            <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1651308779286-44d0bea6-5620-40b3-8778-47484106392c.png" alt="Git配置" class="rounded-md w-full">
                        </div>
                    </div>
                    
                    <div class="grid md:grid-cols-2 gap-6">
                        <div>
                            <h4 class="font-bold text-gray-700 mb-3">3. 配置Maven构建命令</h4>
                            <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1651308779535-2a0a14fb-3cc7-4d68-95bc-e392bf904a52.png" alt="Maven构建" class="rounded-md w-full">
                        </div>
                        <div>
                            <h4 class="font-bold text-gray-700 mb-3">4. 配置自动部署</h4>
                            <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1651308780134-d09a7d28-020a-4d8d-93e8-d2631de79282.png" alt="自动部署" class="rounded-md w-full">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Final Steps Section -->
    <section class="py-16 bg-gray-50">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="text-center mb-16">
                <span class="inline-block px-4 py-1 bg-indigo-100 text-indigo-600 rounded-full text-sm font-semibold mb-4">
                    完成设置
                </span>
                <h2 class="text-3xl md:text-4xl font-bold text-gray-800 mb-4">
                    自动化构建配置
                </h2>
                <div class="w-20 h-1 bg-indigo-500 mx-auto"></div>
            </div>
            
            <div class="max-w-4xl mx-auto">
                <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
                    <div class="md:flex">
                        <div class="p-8 md:p-12">
                            <h3 class="text-2xl font-bold text-gray-800 mb-4">配置WebHook实现自动构建</h3>
                            <p class="text-gray-600 mb-6">
                                通过配置Git仓库的WebHook，可以在代码提交时自动触发Jenkins构建，实现真正的持续集成流程。
                            </p>
                            <div class="bg-gray-800 p-4 rounded-md mb-4">
                                <code class="text-green-400">http://[your-jenkins-server]/generic-webhook-trigger/invoke</code>
                            </div>
                            <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1651308781337-0232d40f-6726-4217-82b0-afc0b86e14e0.png" alt="WebHook配置" class="rounded-md">
                        </div>
                    </div>
                </div>
                
                <div class="text-center mt-12">
                    <a href="https://www.bilibili.com/video/BV1G64y1U7kb/" target="_blank" class="inline-flex items-center px-8 py-4 bg-indigo-600 text-white font-bold rounded-lg hover:bg-indigo-700 transition duration-300">
                        <i class="fas fa-play-circle text-xl mr-3"></i>
                        观看完整视频教程
                    </a>
                </div>
            </div>
        </div>
    </section>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: false,
                htmlLabels: true,
                curve: 'basis'
            },
            pie: {
                useMaxWidth: false,
                htmlLabels: true
            }
        });
    </script>
</body>
</html>